home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / SpriteFight 2002 v2.0a1 / StringUtils.c < prev    next >
Encoding:
Text File  |  1994-02-21  |  1.1 KB  |  48 lines  |  [TEXT/KAHL]

  1. ///--------------------------------------------------------------------------------------
  2. //    StringUtils.c
  3. //
  4. //    Created:    12/17/91 at 12:35:35 AM
  5. //    By:        Tony Myles
  6. //
  7. //    Copyright: © 1991-94 Tony Myles, All rights reserved worldwide.
  8. ///--------------------------------------------------------------------------------------
  9.  
  10.  
  11. #ifndef __MEMORY__
  12. #include <Memory.h>
  13. #endif
  14.  
  15. #ifndef __STRINGUTILS__
  16. #include "StringUtils.h"
  17. #endif
  18.  
  19. #if MPW
  20. #pragma segment Utils
  21. #endif
  22.  
  23. ///--------------------------------------------------------------------------------------
  24. // PStrCpy
  25. ///--------------------------------------------------------------------------------------
  26.  
  27. void PStrCpy(
  28.     Str255 srcStr,
  29.     Str255 dstStr)
  30. {
  31.     BlockMove(srcStr, dstStr, 1 + srcStr[0]);
  32. }
  33.  
  34.  
  35. ///--------------------------------------------------------------------------------------
  36. // PStrCat
  37. ///--------------------------------------------------------------------------------------
  38.  
  39. void PStrCat(
  40.     Str255 srcStr,
  41.     Str255 dstStr)
  42. {
  43.     BlockMove(srcStr + 1, dstStr + dstStr[0] + 1, srcStr[0]);
  44.  
  45.     dstStr[0] += srcStr[0];
  46. }
  47.  
  48.